package cn.net.wangyixinwen.mvvm.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.hjq.shape.layout.ShapeLinearLayout;

import cn.net.wangyixinwen.R;
import cn.net.wangyixinwen.bean.TypeBean;

public class TypeAdapter extends BaseQuickAdapter<TypeBean, BaseViewHolder> {

    public TypeAdapter() {
        super(R.layout.item_type);
    }

    @Override
    protected void convert(BaseViewHolder helper, TypeBean item) {
        helper.setText(R.id.tv_name, item.getTypeName());
        ShapeLinearLayout llItem = helper.getView(R.id.ll_item);
        llItem.setSelected(item.isSelect());
    }
}
